//
//  STPopoverBackgroundView.swift
//  iPhone
//
//  Created by Toj on 12/7/23.
//

import UIKit

class STPopoverBackgroundView: UIPopoverBackgroundView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        _arrowOffset = 0
        backgroundColor = .clear
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private var _arrowDirection: UIPopoverArrowDirection = .any
    open override var arrowDirection: UIPopoverArrowDirection {
        set {
            _arrowDirection = newValue
        }
        get {
            return _arrowDirection
        }
    }
    
    private var _arrowOffset = CGFloat.zero
    override var arrowOffset: CGFloat {
        set {
            _arrowOffset = newValue
        }
        get {
            return _arrowOffset
        }
    }
    
    override static func arrowBase() -> CGFloat {
        return 12
    }
    
    override static func contentViewInsets() -> UIEdgeInsets {
        return .zero
    }
    
    override static func arrowHeight() -> CGFloat {
        return 6
    }
    
    override class var wantsDefaultContentAppearance: Bool {
       return true
    }
    
}
